/**
 * 
 */
package com.example.ourapps.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author richapahwa
 *
 */

@Entity
@Table(uniqueConstraints = @UniqueConstraint(columnNames="applicationName"))
public class AppDetail implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 753562471260213350L;

	@Id
	@GeneratedValue
	private Long appId;
	
	@NotNull
    @Size(min = 10, max = 25)
	@Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
	private String applicationName;
	
	@NotNull
    @Size(min = 1, max = 250)
	private String applicationDescribe;
	
	@NotNull
	private Boolean registered;

	/**
	 * @return the appId
	 */
	public final Long getAppId() {
		return appId;
	}

	/**
	 * @param appId the appId to set
	 */
	public final void setAppId(final Long appId) {
		this.appId = appId;
	}

	/**
	 * @return the applicationName
	 */
	public final String getApplicationName() {
		return applicationName;
	}

	/**
	 * @param applicationName the applicationName to set
	 */
	public final void setApplicationName(final String applicationName) {
		this.applicationName = applicationName;
	}

	/**
	 * @return the applicationDescribe
	 */
	public final String getApplicationDescribe() {
		return applicationDescribe;
	}

	/**
	 * @param applicationDescribe the applicationDescribe to set
	 */
	public final void setApplicationDescribe(final String applicationDescribe) {
		this.applicationDescribe = applicationDescribe;
	}

	/**
	 * @return the registered
	 */
	public final Boolean isRegistered() {
		return registered;
	}

	/**
	 * @param registered the registered to set
	 */
	public final void setRegistered(Boolean registered) {
		this.registered = registered;
	}
	
}
